import request from '@/utils/request'
import { ref } from 'vue'
// 上传文件
export function fileUpload(data, process) {
	return request({
		url: '/upload/videoUpload',
		method: 'post',
		data: data,
		onUploadProgress: (progressEvent) => {
			process.value = Math.floor(progressEvent.loaded / progressEvent.total) * 100
		}
	})
}
// 下载文件
export function downloadFile(data) {
	return request({
		url: '/function/log/downloadFile',
		method: 'post',
		data: data
	})
}
